 <template>
  <el-container>
    <el-main>
      <section class="form_contianer0" style="margin-top: 20px">     
        <div class="manage_tip">
            <p>输入sessionKey，获取菜鸟快递单号</p>
        </div>
        <el-form :model="cainiaoInfo" ref="cainiaoInfo">
            
          <el-form-item prop="sessionKey" class="adminGetCainiaoExpressNumber">
              <el-input v-model="cainiaoInfo.sessionKey" placeholder="sessionKey" style="width: 500px;"></el-input>
          </el-form-item>
          <el-form-item>
              <el-button type="primary" @click="adminGetCainiaoExpressNumberClick(cainiaoInfo)" class="submit_btn">一键获取菜鸟单号</el-button>
          </el-form-item>
            
        </el-form>
      </section>
    </el-main>
  </el-container>
</template>

<script>
    import {adminGetCainiaoExpressNumber} from '@/api/admin'

    export default {
      data () {
        return {

          cainiaoInfo: {
            'sessionKey': ''
          }
        }
      },
      mounted () {
        this.initData()
      },
      methods: {
        async initData () {
        },

        async adminGetCainiaoExpressNumberClick (cainiaoInfo) {
          let result = await adminGetCainiaoExpressNumber(this.cainiaoInfo)
          if (result.status === 200 && result.data.code === 200) {
            // let data = result.data
            // this.userInfo.userId = data.data[0].id
            this.$message({
              type: 'success',
              message: '获取菜鸟快递单号成功！'
            })
          } else {
            this.$message({
              type: 'error',
              message: '获取菜鸟快递单号失败'
            })
          }
        }

      }
    }
</script>

<style lang="less" scoped>
    @import '../../style/mixin';
    .label-title{
        font-weight: bold;
        font-size: 24px;
        color: #ff633b;
        margin: 30px;
    }
    .introduct{
        width: 900px;
        text-align: center;
        margin: auto;
    }
    // .el-button {
    //   width: 200px;
    //   margin: auto;
    //   display: block;
    // }
    .el-table .info-row {
        background: #c9e5f5;
    }

    .el-table .positive-row {
        background: #e2f0e4;
    }
    .avatar-uploader .el-upload {
        border: 1px dashed #d9d9d9;
        border-radius: 6px;
        cursor: pointer;
        position: relative;
        overflow: hidden;
    }
    .avatar-uploader .el-upload:hover {
        border-color: #20a0ff;
    }
    .avatar-uploader-icon {
        font-size: 28px;
        color: #8c939d;
        width: 120px;
        height: 120px;
        line-height: 120px;
        text-align: center;
    }
    .manage_tip {
      margin-bottom: 15px;
    }
    .batch-dialog{
    }
    .batch-table{
        max-height: 400px;
        overflow: auto;
    }
</style>

 